package ro.cityprojects.adminloc.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * BillStates class
 *
 * @author bogdan.solga
 * 
 * Date: 13.06.2013, time: 17:47
 */
@Entity
@javax.persistence.Table(name = "BILL_STATES")
public class BillStates {

    @Id
    @Column(name = "BILL_STATE_ID", nullable = false, insertable = true, updatable = true, length = 0)
    private Integer billStateId;

    public Integer getBillStateId() {
        return billStateId;
    }

    public void setBillStateId(Integer billStateId) {
        this.billStateId = billStateId;
    }

    @Column(name = "STATE", nullable = false, insertable = true, updatable = true, length = 32, precision = 0)
    private String state;

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BillStates that = (BillStates) o;

        if (billStateId != null ? !billStateId.equals(that.billStateId) : that.billStateId != null) return false;
        if (state != null ? !state.equals(that.state) : that.state != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = billStateId != null ? billStateId.hashCode() : 0;
        result = 31 * result + (state != null ? state.hashCode() : 0);
        return result;
    }
}
